﻿#region License
/* ---------------------------------------------------------------- *
 *
 * This file is part of the Xcoordination Application Space
 * ("XcoAppSpace") http://www.xcoordination.com
 *
 * Copyright (C) 2009 Xcoordination http://www.xcoordination.com
 *
 * XcoAppSpace is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General
 * Public License as published by the Free Software Foundation.
 *
 * XcoAppSpace is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses/
 * or write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 * ---------------------------------------------------------------- */
#endregion

using System;
#if !MF
using System.Collections.Generic;
using XcoAppSpaces.Core;

#endif
namespace XcoAppSpaces.Contracts.WorkerResolve
{
	/// <summary>
	/// Message class for responding to a request for resolving a certain worker.
	/// Contains additional information about communicating with the worker.
	/// </summary>
	[Serializable]
	public class ResolveResponse
	{
        private byte resolveStatus;

		/// <summary>
		/// The id of the request, so the response can be mapped to it.
		/// </summary>
		public Guid RequestID { get; set; }

		/// <summary>
		/// The outcome of the requested resolve.
		/// </summary>
        public ResolveStatus Status
        {
            get { return (ResolveStatus)resolveStatus; }
            set { resolveStatus = (byte)value; }
        }

		/// <summary>
		/// The session id that should be used to communicate with the worker.
		/// </summary>
		public Guid SessionID { get; set; }

		/// <summary>
		/// The exception that occurred, when there was a communication error.
		/// </summary>
		public Exception Error { get; set; }

#if !MF
		/// <summary>
		/// The processor attributes of the worker per port type, to be used for
		/// creating the worker proxy (e.g. defines if a worker port runs in sequential
		/// or parallel transfer mode).
		/// </summary>
		public Dictionary<Type, XcoProcessorAttribute> ProcessorAttributes { get; set; }
#endif
	}
}